package com.xinyuan.mapper;

import com.xinyuan.entity.FilePath;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * @Classname WorkHourMaper
 * @Description TODO
 * @Date 2020/5/29 14:08
 * @Created by zfl
 */
@Mapper
public interface WorkHourMaper {

    @Insert("insert into workhour(THRESHOL_FH,THRESHOL_FC,THRESHOL_MO,INTERV_FH,INTERV_FC,INTERV_MO,A_THRESHOL,C_THRESHOL,A_INTERV,C_INTERV," +
            "MTOP_THRESHOL,MTOP_INTERV) values (#{THRESHOL_FH},#{THRESHOL_FC},#{THRESHOL_MO}," +
            "#{INTERV_FH},#{INTERV_FC},#{INTERV_MO},#{A_THRESHOL},#{C_THRESHOL},#{A_INTERV},#{C_INTERV},#{MTOP_THRESHOL},#{MTOP_INTERV})")
    void insertWorkHour(@Param("THRESHOL_FH") double THRESHOL_FH, @Param("THRESHOL_FC") double THRESHOL_FC, @Param("THRESHOL_MO") double THRESHOL_MO,@Param("INTERV_FH") double INTERV_FH, @Param("INTERV_FC") double INTERV_FC, @Param("INTERV_MO") double INTERV_MO,
                       @Param("A_THRESHOL") String A_THRESHOL,@Param("C_THRESHOL") String C_THRESHOL,@Param("A_INTERV") String A_INTERV,@Param("C_INTERV") String C_INTERV,@Param("MTOP_THRESHOL") String MTOP_THRESHOL,@Param("MTOP_INTERV") String MTOP_INTERV);

    @Insert("insert into filePath(filePath,fileID) values(#{filePath},#{fileID})")
    int insertFilePath(@Param("filePath") String filePath, @Param("fileID") String fileID);

    /*@Select("select * from filePath where fileID = #{fileID}")
    @Results({
            @Result(property = "filePath",column = "filePath"),
            @Result(property = "fileID",column = "fileId")})
    FilePath findByFileID(@Param("fileID") String fileID);*/
}
